Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(releases): reverting releases #8008

Merged
merged 26 commits into from
Dec 14, 2024
Merged

feat(releases): reverting releases #8008

merged 26 commits into from
Dec 14, 2024

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Dec 10, 2024

Description

https://www.loom.com/share/6eaf274374ba4bb78b8f381bfd8e9fbf?sid=4610ffad-3561-4cdf-82ab-cc76edb72690

What to review

  • There's a new Release CTA ReleaseRevertButton
  • The dialog rendered here will do 2 things
    • check if there are any version documents in the release which have transactions after the publish transaction
    • Generate all document states the revert to
  • Generating document states is optimistically started - when the confirm dialog opens then this process starts. If the states are resolved before the confirm button is pressed, then these states will immediately be used to create new version documents. If these states are still pending, then the creation of the revert release will await completion before proceeding.

Testing

Added tests for the new hooks to:

  • determine if there is further history in any document after the original release publish
  • fetch the document states to revert to

Tests also for createReleaseOperationsStore where the revertRelease operation exists.

Will fast-follow tests for ReleaseRevertButton

Notes for release

N/A

Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:22pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:22pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:22pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:22pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 13, 2024 6:22pm

@jordanl17 jordanl17 force-pushed the corel-revert-release branch from 08c4836 to dfc0755 Compare December 11, 2024 12:59
Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Dec 11, 2024

Component Testing Report Updated Dec 13, 2024 6:17 PM (UTC)

❌ Failed Tests (6) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 14s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 42s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 56s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 28s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 15s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ❌ Failed (Inspect) 4m 27s 0 0 6
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 12s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 55s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 49s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 14s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 43s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 54s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Contributor

github-actions bot commented Dec 11, 2024

⚡️ Editor Performance Report

Updated Fri, 13 Dec 2024 18:18:15 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 27.0 efps (37ms) 17.9 efps (56ms) +19ms (+51.4%) 🔴
article (body) 67.6 efps (15ms) 71.9 efps (14ms) -1ms (-/-%)
article (string inside object) 26.3 efps (38ms) 18.0 efps (56ms) +18ms (+46.1%) 🔴
article (string inside array) 23.8 efps (42ms) 16.9 efps (59ms) +17ms (+40.5%) 🔴
recipe (name) 45.5 efps (22ms) 27.8 efps (36ms) +14ms (+63.6%) 🔴
recipe (description) 52.6 efps (19ms) 30.3 efps (33ms) +14ms (+73.7%) 🔴
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 19.6 efps (51ms) 7.0 efps (142ms) +91ms (+178.4%) 🔴
synthetic (string inside object) 19.6 efps (51ms) 7.2 efps (138ms) +87ms (+170.6%) 🔴

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 37ms 39ms 46ms 62ms 147ms 10.0s
article (body) 15ms 18ms 22ms 192ms 271ms 5.3s
article (string inside object) 38ms 45ms 50ms 235ms 276ms 6.9s
article (string inside array) 42ms 45ms 57ms 249ms 272ms 7.1s
recipe (name) 22ms 23ms 26ms 38ms 0ms 7.7s
recipe (description) 19ms 21ms 24ms 29ms 0ms 4.7s
recipe (instructions) 6ms 8ms 10ms 19ms 0ms 3.2s
synthetic (title) 51ms 53ms 57ms 128ms 177ms 12.8s
synthetic (string inside object) 51ms 54ms 74ms 559ms 973ms 8.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 56ms 59ms 65ms 231ms 997ms 12.2s
article (body) 14ms 17ms 33ms 104ms 152ms 4.9s
article (string inside object) 56ms 58ms 67ms 320ms 875ms 8.5s
article (string inside array) 59ms 62ms 70ms 285ms 1219ms 8.9s
recipe (name) 36ms 39ms 45ms 74ms 22ms 8.6s
recipe (description) 33ms 35ms 41ms 85ms 5ms 6.1s
recipe (instructions) 6ms 8ms 9ms 20ms 0ms 3.2s
synthetic (title) 142ms 153ms 176ms 743ms 7357ms 22.0s
synthetic (string inside object) 138ms 144ms 159ms 564ms 6526ms 16.8s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

@jordanl17
Copy link
Member Author

Great work, @jordanl17! I've left a few comments/questions for your consideration. Feel free to unblock yourself by merging and address my feedback whenever convenient.

Thanks, I've merged this as it feels 'demo-able' enough. But will create a separate PR for the valid concerns around surfacing up appropriate errors and considering if useDocumentRevertStates can just be async. Will link this PR in the next one I raise shortly

@jordanl17 jordanl17 merged commit f5f6824 into corel Dec 14, 2024
55 of 56 checks passed
@jordanl17 jordanl17 deleted the corel-revert-release branch December 14, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants